package com.jiayinlending.jiayindai.adapter;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.myrepay.RepaymentDetailsActivity;
import com.jiayinlending.jiayindai.adapter.base.BaseRecyclerViewAdapter;
import com.jiayinlending.jiayindai.adapter.viewholder.RepaymentRecordHolder;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.List;

/**
 * Created by xiaohei on 2017/4/14.
 */

public class RepaymentRecordAdpater extends BaseRecyclerViewAdapter<RepaymentRecordHolder, Info> {
    public RepaymentRecordAdpater(Context context, List<Info> data) {
        super(context, data);
    }

    @Override
    public RepaymentRecordHolder onCreateViewHolder(final ViewGroup parent, int viewType) {
        View view = View.inflate(parent.getContext(), R.layout.activity_repayment_record_item, null);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(parent.getContext(), RepaymentDetailsActivity.class);
                context.startActivity(intent);
            }
        });
        return new RepaymentRecordHolder(view);
    }

    @Override
    public void onBindViewHolder(RepaymentRecordHolder holder, int position) {

    }
}
